import Vue from 'vue'
import VueRouter from 'vue-router'
// import testComponent from '../views/test.vue'
import HomeView from '../views/homeView.vue'
import InboundPortBoard from '../views/inboundPortBoard.vue'
import SortBoard from '../views/sortBoard.vue'
import OutboundPort from '../views/outboundPort.vue'
import DefectiveOutbound from '../views/defectiveOutbound.vue'
import StorageBoard from '../views/storageBoard.vue'
import StorageMonitor from '../views/storageMonitor.vue'
import JtStorageBoard from '../views/jtStorageBoard.vue'
import ProductManagement from '../views/productManagement.vue'
// import { component } from 'vue/types/umd.js'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'homeView',
    component: HomeView
  },
  {
    path: '/inboundport/:id',
    name: 'inboundPortBoard',
    component: InboundPortBoard
  },
  {
    path: '/sortboard',
    name: 'sortBoard',
    component: SortBoard
  },
  {
    path: '/outboundport/:id',
    name: 'outboundPort',
    component: OutboundPort
  },
  // 不良品看板
  {
    path: '/defectiveOutbound/:id',
    name: 'defectiveOutbound',
    component: DefectiveOutbound
  },
  {
    path: '/storageBoard',
    name: 'storageBoard',
    component: StorageBoard
  },
  {
    path: '/storageMonitor',
    name: 'storageMonitor',
    component: StorageMonitor
  },
  {
    path: '/jtStorageBoard',
    name: 'jtStorageBoard',
    component: JtStorageBoard
  },
  {
    path: '/productManagement',
    name: 'productManagement',
    component: ProductManagement
  }
  // {
  //   path: '/home',
  //   name: 'Home',
  //   // component: Home
  //   component: () => import('../views/Home.vue')
  // },
  // {
  //   path: '/agv',
  //   name: 'Agv',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AGV.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
